package com.heima.kafka.listener;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

/**
 * @Author: xsz
 * @DateTime: 2024/4/2 0:35
 **/

@Component
public class HelloListener {


    @KafkaListener(topics = "itcast-topic" )
    public void onMessage(String message){
        if (!StringUtils.isEmpty(message)){
            System.out.println(message);
        }
    }

}
